Skip to content

Conversation

@minichma
Copy link
Collaborator

@minichma minichma commented Feb 23, 2025

Reproduce and fix #736. I.e. if UNTIL falls into a DST change with ambiguity, then recurrences could have missed, which is fixed with this PR.

Other improvements include:

  • Remove implicit conversion operator from System.DateTime to CalDateTime, which could cause confusion and was a source of bugs.
  • Remove AsUtc from CalDateTime.GetHashCode() to avoid timezone calculations
  • Avoid UTC conversion when comparing two CalDateTime if they have the same TzId

@minichma minichma force-pushed the work/minichma/bugfix/until_tzconversion branch from 77a049e to 124cb51 Compare February 23, 2025 15:16
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 23, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Ical.Net/DataTypes/CalDateTime.cs 25% 0 Missing and 3 partials ⚠️
...alization/DataTypes/RecurrencePatternSerializer.cs 0% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (75%) is below the target coverage (80%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (66%) is below the target coverage (80%). You can increase the head coverage or adjust the target coverage.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #738   +/-   ##
===================================
- Coverage    66%    66%   -0%     
===================================
  Files       105    105           
  Lines      4649   4633   -16     
  Branches   1151   1144    -7     
===================================
- Hits       3073   3054   -19     
+ Misses     1142   1139    -3     
- Partials    434    440    +6     
Files with missing lines Coverage Δ
Ical.Net/Evaluation/RecurrencePatternEvaluator.cs 91% <100%> (-<1%) ⬇️
...alization/DataTypes/RecurrencePatternSerializer.cs 72% <0%> (+1%) ⬆️
Ical.Net/DataTypes/CalDateTime.cs 86% <25%> (-4%) ⬇️

... and 1 file with indirect coverage changes

@minichma minichma linked an issue Feb 23, 2025 that may be closed by this pull request
@minichma minichma changed the title Fix #736 - WIP Fix incorrect handling of UNTIL if falling into DST change and some related improvements Feb 23, 2025
@minichma minichma marked this pull request as ready for review February 23, 2025 19:00
@minichma minichma requested a review from axunonb February 23, 2025 19:00
Copy link
Collaborator

@axunonb axunonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UNTIL not handled correctly if it falls into a DST change

3 participants